﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="InputRatingForm1.aspx.cs" Inherits="WebApplicationRating.Views.InputRatingForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="imageid" DataSourceID="SqlDataSource1">
 <Columns>
 <asp:BoundField DataField="imageid" HeaderText="ImgId" InsertVisible="False" 
         ReadOnly="True" SortExpression="imageid" />
 <asp:BoundField DataField="name" HeaderText="Name" SortExpression="name" />
<asp:TemplateField HeaderText="Image">
 <ItemTemplate>
   <asp:Image ID="Image1" runat="server" ImageUrl='<%# "Handler.ashx?imageid=" + Eval("imageid")%>' Width = "100" />
  </ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="imageid" 
         DataNavigateUrlFormatString="./JustImage.aspx?MGID={0}" HeaderText="BigImage" 
         Text="Viewer"/>
<asp:HyperLinkField DataNavigateUrlFields="imageid" 
         DataNavigateUrlFormatString="./Trends.aspx?MGID={0}" HeaderText="Trends" 
         Text="Status"/>
<asp:HyperLinkField DataNavigateUrlFields="imageid" DataNavigateUrlFormatString="./UserImageRatings.aspx?MGID={0}" HeaderText="Rating" Text="Add++ My Rating" /> 
  </Columns>
</asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:imageConnectionString %>" 
        SelectCommand="SELECT [imageid], [name], [image_file] FROM [Image]">
    </asp:SqlDataSource>
        <p>
    </p>
</asp:Content>
